using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using OVS.BusinessObjects;

namespace OVS.DAL
{
	public partial class CameraImage_HaarDAO
	{
        public int AddCameraImage_Haar2(CameraImage_Haar oCameraImage_Haar)
        {
            try
            {
                DbCommand oDbCommand = DbProviderHelper.CreateCommand("INSERT INTO [CameraImage_Haar]([Camera_came_id],[Image_Haar_imha_id])VALUES(@came_id,@Image_haar_id);SELECT SCOPE_IDENTITY();", CommandType.Text);
                oDbCommand.Parameters.Add(DbProviderHelper.CreateParameter("@came_id", DbType.Int32, oCameraImage_Haar.Camera_came_id));
                oDbCommand.Parameters.Add(DbProviderHelper.CreateParameter("@Image_haar_id", DbType.Int32, oCameraImage_Haar.Image_Haar_imha_id));

                return DbProviderHelper.ExecuteNonQuery(oDbCommand);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
	}
}
